import request from '@/utils/request_miva_work.js';

export function getRoleList() {
  return request({
    url: '/userRoles',
    method: 'GET'
  });
}

export function editRoleName({ id, role_name }) {
  return request({
    url: '/userRole/' + id,
    method: 'PUT',
    data: { role_name }
  });
}

export function deleteRole({ id }) {
  return request({
    url: '/userRole/' + id,
    method: 'DELETE'
  });
}

export function createRole({ role_name }) {
  return request({
    url: '/userRole',
    method: 'POST',
    data: { role_name }
  });
}
